package jdk_observer_pattern;

import lombok.AllArgsConstructor;
import lombok.Data;

import java.util.Observable;

@Data
@AllArgsConstructor
public class Thief extends Observable {

    String name;

    public void steal(){
        System.out.println("我来偷东西了");
        super.setChanged();
        super.notifyObservers();
    }
}
